package com.huihui.vueadminapi.entity;

import java.util.ArrayList;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;

/**
 * (SysRole)表实体类
 *
 * @author liyonghui
 * @since 2022-04-14 14:09:15
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel(description = "")
@SuppressWarnings("serial")
public class SysRole extends Model<SysRole> implements Serializable {
    private static final long serialVersionUID = -14252938893737275L;

    @ApiModelProperty("角色ID")
    @TableId(value="id",type= IdType.AUTO)
    private Long id;

    @NotBlank(message = "角色名称不能为空")
    @ApiModelProperty("角色名称")
    private String name;

    @NotBlank(message = "角色编码不能为空")
    @ApiModelProperty("角色标识")
    private String code;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("创建时间")
    private Date created;

    @ApiModelProperty("更新时间")
    private Date updated;

    @ApiModelProperty("状态")
    private Integer statu;

    /**
     * @description 角色关联菜单ID
     * @author liyonghui
     * @date 2022/4/28 14:59
     */
    @TableField(exist = false)
    private List<Long> menuIds = new ArrayList<>();
}

